-
Notifications
You must be signed in to change notification settings - Fork 926
Depreciation Warning <Component>.defaultProps #955
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
for those who are looking for replacement, take a look at @uiw/react-color. |
@sarojshakya01 open console and check file name like in my case Then click on the file name and you get to know where the actual issue is, like in my case check the cursor position Then hover over the file name and you will get file path and then open file in any editor and remove default props and assign their value directly Library code before: import React, { isValidElement } from 'react'; export var Checkboard = function Checkboard(_ref) { var styles = reactCSS({ Checkboard.defaultProps = { export default Checkboard;` Library Code After: import React, { isValidElement } from 'react'; // Checkboard.defaultProps = { export var Checkboard = function Checkboard(_ref) { var styles = reactCSS({ export default Checkboard;` Then build your project again using yarn build or npm run build |
@masahmad71 I installed this library @uiw/react-color and then got to know that its have a lot of errors like when change alpha/opacity of color then this library returns NaN and I am unable to change color. |
I am encountering following irritating warning in my console. Has it been addressed in the beta version? Will be it be updated in the future release?
"Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead."
The text was updated successfully, but these errors were encountered: